<!--
 * @Author: 瞿旺兴 18774621495@163.com
 * @Date: 2022-05-20 10:25:21
 * @LastEditors: 瞿旺兴 18774621495@163.com
 * @LastEditTime: 2022-06-08 17:32:01
 * @FilePath: \nien-vue3-admin\src\views\finance\receiverManame\reconciliationManagement\Receivable\collectionManage\airSeaDispatchWriteOff\detail.vue
 * @Description: 空海派核销详情
-->
<template>
  <custom-container ref="customContainerRef" :config="config" />
  <single-ticket-dialog ref="singleTickDialogRef" />
</template>

<script setup lang="ts">
import { computed, reactive, defineAsyncComponent, ref } from 'vue'
import { ElButton } from 'element-plus'

const SingleTicketDialog = defineAsyncComponent(() => import('./components/SingleTicketDialog.vue'))
const singleTickDialogRef = ref(null)
const queryParams = reactive({
  pageSize: 10,
  pageNum: 1,
  afterCurrency: undefined,
  exchangeRate: undefined,
  startDate: undefined,
  endDate: undefined,
  remark: undefined,
})
const config = computed({
  get() {
    return {
      query: {
        fields: [
          {
            label: '客户订单号',
            prop: 'afterCurrency',
          },
          {
            label: '销售产品',
            prop: 'exchangeRate',
          },
        ],
        queryParams,
        formOption: {},
      },
      btns: [],
      table: {
        columns: [
          { type: 'index', width: '55', align: 'center' },
          { label: '创建时间', align: 'center', prop: 'beforeCurrency' },
          { label: '客户名称', align: 'center', prop: 'afterCurrency' },
          { label: '单价', align: 'center', prop: 'exchangeRate' },
          { label: '总实重', align: 'center', prop: 'startDate' },
          { label: '总材积重', align: 'center', prop: 'startDate' },
          { label: '总计费重', align: 'center', prop: 'startDate' },
          { label: '总件数', align: 'center', prop: 'startDate' },
          { label: '单票总金额', align: 'center', prop: 'startDate' },
          { label: '附加费', align: 'center', prop: 'startDate' },
          { label: '总金额', align: 'center', prop: 'startDate' },
          { label: '客户单号', align: 'center', prop: 'startDate' },
          { label: '转单号', align: 'center', prop: 'startDate' },
          { label: '销售产品', align: 'center', prop: 'startDate' },
          { label: '国家', align: 'center', prop: 'startDate' },
          { label: '邮编', align: 'center', prop: 'startDate' },
          { label: '备注', align: 'center', prop: 'startDate' },
          {
            label: '操作',
            align: 'center',
            width: '120',
            fixed: 'right',
            render(h, params) {
              return [
                h(
                  ElButton,
                  {
                    text: true,
                    type: 'primary',
                    onClick: () => {
                      singleTickDialogRef.value.open()
                    },
                  },
                  {
                    default: () => '详情 ',
                  },
                )]
            },
          },
        ],
        event: {
        },
      },
      api: () => Promise.resolve({ code: 200, data: [{ a: 2 }, { b: 2 }] }),
    }
  },
  set(val) {
    return val
  },
})

</script>
